package cn.xiaopengstack.domain.order.service;

import cn.xiaopengstack.domain.order.model.entity.OrderUpdateEntity;
import cn.xiaopengstack.domain.order.model.entity.PayOrderEntity;
import cn.xiaopengstack.domain.order.model.entity.ShopCarEntity;
import cn.xiaopengstack.domain.pay.model.entity.CreatePayEntity;
import com.alipay.api.AlipayApiException;

/**
 * @author jiangyangang
 */
public interface IOrderService {

    /**
     * 创建订单
     * @param shopCarEntity
     * @return
     */
    PayOrderEntity createOrder(ShopCarEntity shopCarEntity) throws AlipayApiException;

    /**
     * 预备支付
     * @param createPayEntity
     * @return
     */
    PayOrderEntity prepareToPay(CreatePayEntity createPayEntity);

    /**
     * 更新订单状态
     * @param orderUpdateEntity
     */
    void updateOrder(OrderUpdateEntity orderUpdateEntity);
}
